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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.v: D = None
        self.y: A = None
        self.x: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: B = None
        self.s: H = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.txt = txt

j = A("j")
f = B("f")
d = C("d")
e = D("e")
a = E("a")
b = F("b")
l = G("l")
m = H("m")
n = F("n")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.v: D = None
        self.y: A = None
        self.x: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: B = None
        self.s: H = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.txt = txt

j = A("j")
f = B("f")
d = C("d")
e = D("e")
a = E("a")
b = F("b")
l = G("l")
m = H("m")
n = F("n")

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