class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.y: F = None
        self.p: D = None
        self.u: D = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.v: E = None
        self.x: B = None
        self.r: G = None
        self.u: D = None
        self.t: E = None
        self.o: C = None
        self.txt = txt

l = A("l")
b = B("b")
d = C("d")
i = D("i")
k = E("k")
c = F("c")
h = G("h")
n = H("n")
m = B("m")
f = H("f")

l.o = k
l.y = n
l.w = h
b.o = h
b.x = m
b.y = c
b.p = i
b.u = i
b.z = d
b.v = l
d.x = k
i.y = h
i.p = l
i.w = n
k.z = l
c.u = i
c.s = h
c.t = h
c.o = k
c.p = d
c.q = b
c.r = b
h.t = l
h.v = l
h.x = m
h.p = d
n.z = f
n.s = l
n.v = k
n.t = k
n.x = m
n.r = h
n.u = i
n.o = d
m.o = h
m.x = b
m.y = c
m.p = i
m.u = i
m.z = d
m.v = l
f.z = n
f.s = l
f.v = k
f.t = k
f.x = b
f.r = h
f.u = i
f.o = d
assert c.u.y.x.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.y: F = None
        self.p: D = None
        self.u: D = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.v: E = None
        self.x: B = None
        self.r: G = None
        self.u: D = None
        self.t: E = None
        self.o: C = None
        self.txt = txt

l = A("l")
b = B("b")
d = C("d")
i = D("i")
k = E("k")
c = F("c")
h = G("h")
n = H("n")
m = B("m")
f = H("f")

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