class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.x: C = None
        self.t: F = None
        self.s: C = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.y: A = None
        self.o: C = None
        self.z: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.w: D = None
        self.o: E = None
        self.t: C = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.y: A = None
        self.o: C = None
        self.z: B = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.w: D = None
        self.o: E = None
        self.t: C = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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