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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: F = None
        self.y: E = None
        self.q: G = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: G = None
        self.s: A = None
        self.u: F = None
        self.p: A = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.v: D = None
        self.z: B = None
        self.w: A = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: F = None
        self.y: E = None
        self.q: G = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: G = None
        self.s: A = None
        self.u: F = None
        self.p: A = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.v: D = None
        self.z: B = None
        self.w: A = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

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

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