class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.u: C = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.z: G = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

i = A("i")
g = B("g")
j = C("j")
a = D("a")
f = E("f")
b = F("b")
k = G("k")
l = E("l")
c = C("c")
h = G("h")

i.t = j
g.z = f
g.q = c
g.p = c
g.s = l
j.x = a
j.z = a
a.s = g
a.p = g
f.v = g
f.s = l
f.r = l
f.u = c
f.w = k
b.t = a
b.y = i
b.s = j
k.y = g
k.v = l
k.z = h
k.q = i
k.t = c
l.v = g
l.s = f
l.r = f
l.u = j
l.w = k
c.x = a
c.z = a
h.y = g
h.v = l
h.z = k
h.q = i
h.t = j
assert c.x.p.s.v.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.u: C = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.z: G = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

i = A("i")
g = B("g")
j = C("j")
a = D("a")
f = E("f")
b = F("b")
k = G("k")
l = E("l")
c = C("c")
h = G("h")

i.t = j
g.z = f
g.q = c
g.p = c
g.s = l
j.x = a
j.z = a
a.s = g
a.p = g
f.v = g
f.s = l
f.r = l
f.u = c
f.w = k
b.t = a
b.y = i
b.s = j
k.y = g
k.v = l
k.z = h
k.q = i
k.t = c
l.v = g
l.s = f
l.r = f
l.u = j
l.w = k
c.x = a
c.z = a
h.y = g
h.v = l
h.z = k
h.q = i
h.t = j
assert c.x.p.s.v.z.w.txt == "k"