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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.o: E = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: G = None
        self.o: E = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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