class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.q: F = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.s: B = None
        self.r: B = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: E = None
        self.w: D = None
        self.z: F = None
        self.q: C = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.txt = txt

l = A("l")
m = B("m")
n = C("n")
a = D("a")
j = E("j")
f = F("f")
b = D("b")
k = B("k")
d = C("d")
h = D("h")

l.z = d
l.x = d
l.q = f
l.p = j
l.y = b
m.x = b
m.o = j
m.y = j
m.s = k
m.r = k
m.q = a
n.o = k
n.v = k
n.p = j
n.w = a
n.z = f
n.q = d
a.y = n
j.t = f
j.o = f
j.v = k
f.x = k
f.p = n
b.y = n
k.x = b
k.q = b
k.o = j
k.y = j
k.s = m
k.r = m
d.o = m
d.p = j
d.w = a
d.z = f
d.q = n
d.v = k
h.y = n
assert f.x.r.q.y.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.q: F = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.s: B = None
        self.r: B = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: E = None
        self.w: D = None
        self.z: F = None
        self.q: C = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.txt = txt

l = A("l")
m = B("m")
n = C("n")
a = D("a")
j = E("j")
f = F("f")
b = D("b")
k = B("k")
d = C("d")
h = D("h")

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