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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: F = None
        self.x: E = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: B = None
        self.q: F = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: F = None
        self.x: E = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: B = None
        self.q: F = None
        self.u: D = None
        self.txt = txt

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

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