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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.q: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: E = None
        self.w: A = None
        self.y: A = None
        self.t: H = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.s: C = None
        self.y: B = None
        self.x: B = None
        self.z: H = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.r: E = None
        self.w: C = None
        self.s: B = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

b = A("b")
c = B("c")
l = C("l")
d = D("d")
i = E("i")
m = F("m")
a = G("a")
h = H("h")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.q: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: E = None
        self.w: A = None
        self.y: A = None
        self.t: H = None
        self.x: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.s: C = None
        self.y: B = None
        self.x: B = None
        self.z: H = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.r: E = None
        self.w: C = None
        self.s: B = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

b = A("b")
c = B("c")
l = C("l")
d = D("d")
i = E("i")
m = F("m")
a = G("a")
h = H("h")

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