class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.w: G = None
        self.t: F = None
        self.q: C = None
        self.s: E = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.y: A = None
        self.v: H = None
        self.z: E = None
        self.w: E = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.u: A = None
        self.p: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

a = A("a")
d = B("d")
h = C("h")
l = D("l")
f = E("f")
c = F("c")
n = G("n")
k = H("k")
e = F("e")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.y: A = None
        self.v: H = None
        self.z: E = None
        self.w: E = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: B = None
        self.u: A = None
        self.p: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

a = A("a")
d = B("d")
h = C("h")
l = D("l")
f = E("f")
c = F("c")
n = G("n")
k = H("k")
e = F("e")

a.o = c
a.t = c
a.y = f
a.s = f
a.w = n
a.z = n
a.q = h
a.p = e
d.s = l
d.y = n
h.t = e
l.x = k
f.t = e
c.q = d
c.p = k
c.v = k
c.y = a
c.z = f
c.w = f
c.r = e
c.u = n
n.x = l
n.p = l
n.q = d
n.u = a
n.w = k
k.q = h
e.q = d
e.p = k
e.v = k
e.y = a
e.z = f
e.w = f
e.r = c
e.u = n
assert d.y.x.x.txt == "k"