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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.w: A = None
        self.t: F = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.r: F = None
        self.s: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: H = None
        self.w: A = None
        self.t: F = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.r: F = None
        self.s: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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