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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.x: E = None
        self.q: E = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

a = A("a")
j = B("j")
e = C("e")
n = D("n")
d = E("d")
c = F("c")
g = F("g")
f = E("f")
k = A("k")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.x: E = None
        self.q: E = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

a = A("a")
j = B("j")
e = C("e")
n = D("n")
d = E("d")
c = F("c")
g = F("g")
f = E("f")
k = A("k")

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