class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.r: E = None
        self.w: C = None
        self.t: E = None
        self.q: D = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: C = None
        self.x: F = None
        self.s: G = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.x: A = None
        self.q: H = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: C = None
        self.x: F = None
        self.s: G = None
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: E = None
        self.x: A = None
        self.q: H = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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