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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.t: C = None
        self.u: F = None
        self.v: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: F = None
        self.t: F = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.t: C = None
        self.u: F = None
        self.v: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: F = None
        self.t: F = None
        self.s: F = None
        self.r: D = None
        self.txt = txt

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

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

j.y = d
j.t = a
k.v = a
k.p = e
f.v = e
f.s = k
f.o = b
a.o = g
a.p = h
a.u = h
a.t = e
a.v = b
a.z = d
b.x = a
b.r = a
b.y = h
b.s = h
b.t = d
d.x = k
d.p = k
d.s = m
d.w = j
d.z = j
h.x = k
h.p = k
h.s = g
h.w = g
h.z = m
e.v = f
e.s = k
e.o = b
g.y = d
g.t = a
m.y = d
m.t = a
assert b.s.z.y.z.t.t.v.txt == "f"