class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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