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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.r: B = None
        self.x: H = None
        self.o: F = None
        self.p: E = None
        self.u: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: B = None
        self.z: D = None
        self.r: A = None
        self.v: E = None
        self.s: I = None
        self.q: D = None
        self.t: B = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.z: C = None
        self.u: C = None
        self.o: E = None
        self.w: J = None
        self.r: H = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.x: C = None
        self.t: F = None
        self.q: E = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.r: B = None
        self.x: H = None
        self.o: F = None
        self.p: E = None
        self.u: J = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: B = None
        self.z: D = None
        self.r: A = None
        self.v: E = None
        self.s: I = None
        self.q: D = None
        self.t: B = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.z: C = None
        self.u: C = None
        self.o: E = None
        self.w: J = None
        self.r: H = None
        self.x: J = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.x: C = None
        self.t: F = None
        self.q: E = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

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

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

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