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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.r: G = None
        self.p: A = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.r: C = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.r: G = None
        self.p: A = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.r: C = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

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