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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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