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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: F = None
        self.r: E = None
        self.z: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: E = None
        self.u: D = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: F = None
        self.r: E = None
        self.z: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: E = None
        self.u: D = None
        self.z: F = None
        self.txt = txt

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

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