class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.x: H = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.w: D = None
        self.v: D = None
        self.t: D = None
        self.x: B = None
        self.txt = txt

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

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

i = A("i")
f = B("f")
a = C("a")
d = D("d")
c = E("c")
b = F("b")
j = G("j")
k = H("k")
l = H("l")
g = H("g")

i.q = j
i.r = j
i.p = f
i.x = g
i.z = c
f.s = c
a.q = d
a.p = i
a.o = c
a.r = j
a.w = b
d.x = f
d.y = i
c.w = b
b.p = c
b.y = a
b.w = d
b.v = d
b.t = d
b.x = f
j.p = g
j.u = a
j.s = a
j.v = c
j.q = d
j.z = d
j.o = b
k.x = c
l.x = c
g.x = c
assert i.x.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.x: H = None
        self.z: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.w: D = None
        self.v: D = None
        self.t: D = None
        self.x: B = None
        self.txt = txt

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

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

i = A("i")
f = B("f")
a = C("a")
d = D("d")
c = E("c")
b = F("b")
j = G("j")
k = H("k")
l = H("l")
g = H("g")

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