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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.x: F = None
        self.v: E = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
m = D("m")
a = E("a")
d = F("d")
l = G("l")

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.x: F = None
        self.v: E = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
m = D("m")
a = E("a")
d = F("d")
l = G("l")

g.z = l
g.s = m
g.v = d
g.t = a
g.r = b
g.u = j
b.s = d
j.s = d
j.r = l
m.z = j
a.r = g
a.x = b
d.w = l
l.o = d
l.x = d
l.z = d
l.y = j
l.s = j
l.v = a
assert g.u.s.w.z.w.txt == "l"