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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.t: F = None
        self.s: A = None
        self.u: A = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

f = A("f")
j = B("j")
i = C("i")
n = D("n")
h = E("h")
a = F("a")
e = G("e")
m = H("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.t: F = None
        self.s: A = None
        self.u: A = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

f = A("f")
j = B("j")
i = C("i")
n = D("n")
h = E("h")
a = F("a")
e = G("e")
m = H("m")

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