class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.u: C = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: F = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: F = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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