class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.p: D = None
        self.r: G = None
        self.u: F = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.u: D = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.p: A = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.txt = txt

c = A("c")
e = B("e")
j = C("j")
n = D("n")
m = E("m")
l = F("l")
h = G("h")
f = E("f")
g = G("g")
k = C("k")

c.t = j
c.v = j
c.q = k
c.p = n
c.r = g
c.u = l
c.y = e
e.v = j
e.r = j
e.o = n
e.u = n
e.t = n
j.w = l
n.s = f
n.z = c
n.w = c
m.q = l
l.o = n
l.t = j
l.p = c
l.q = c
l.y = h
h.u = g
h.z = k
f.q = l
g.u = h
g.z = j
k.w = l
assert f.q.t.w.t.w.p.r.z.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.p: D = None
        self.r: G = None
        self.u: F = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.u: D = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.p: A = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.txt = txt

c = A("c")
e = B("e")
j = C("j")
n = D("n")
m = E("m")
l = F("l")
h = G("h")
f = E("f")
g = G("g")
k = C("k")

c.t = j
c.v = j
c.q = k
c.p = n
c.r = g
c.u = l
c.y = e
e.v = j
e.r = j
e.o = n
e.u = n
e.t = n
j.w = l
n.s = f
n.z = c
n.w = c
m.q = l
l.o = n
l.t = j
l.p = c
l.q = c
l.y = h
h.u = g
h.z = k
f.q = l
g.u = h
g.z = j
k.w = l
assert f.q.t.w.t.w.p.r.z.w.t.txt == "j"