class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.p: G = None
        self.s: G = None
        self.q: A = None
        self.t: F = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: B = None
        self.p: C = None
        self.r: E = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: B = None
        self.p: C = None
        self.r: E = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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