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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.y: G = None
        self.w: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.u: F = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.y: G = None
        self.w: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.u: F = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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