class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: F = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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