class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.t: A = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.z: C = None
        self.v: F = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.p: C = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.t: A = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.z: C = None
        self.v: F = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.p: C = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

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

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