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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.r: F = None
        self.u: F = None
        self.p: B = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.r: F = None
        self.u: F = None
        self.p: B = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

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

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