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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.p: A = None
        self.z: E = None
        self.x: G = None
        self.u: F = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.x: F = None
        self.p: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.p: A = None
        self.z: E = None
        self.x: G = None
        self.u: F = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.x: F = None
        self.p: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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