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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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