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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

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

c = A("c")
b = B("b")
m = C("m")
f = D("f")
g = E("g")
k = F("k")
d = G("d")
n = H("n")

c.z = m
c.s = m
c.u = m
c.x = n
c.t = b
c.r = b
c.y = b
b.t = m
b.y = m
b.v = d
m.s = d
m.t = c
f.p = c
f.v = b
f.w = m
f.u = g
f.z = g
f.y = d
g.w = b
g.u = d
g.s = f
k.x = c
k.t = c
k.s = c
k.z = n
k.q = m
k.r = m
d.p = f
d.x = m
d.t = b
n.u = d
n.x = d
n.v = d
assert d.p.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: H = None
        self.t: B = None
        self.s: C = None
        self.r: B = None
        self.u: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

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

c = A("c")
b = B("b")
m = C("m")
f = D("f")
g = E("g")
k = F("k")
d = G("d")
n = H("n")

c.z = m
c.s = m
c.u = m
c.x = n
c.t = b
c.r = b
c.y = b
b.t = m
b.y = m
b.v = d
m.s = d
m.t = c
f.p = c
f.v = b
f.w = m
f.u = g
f.z = g
f.y = d
g.w = b
g.u = d
g.s = f
k.x = c
k.t = c
k.s = c
k.z = n
k.q = m
k.r = m
d.p = f
d.x = m
d.t = b
n.u = d
n.x = d
n.v = d
assert d.p.p.u.txt == "m"