class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: F = None
        self.o: D = None
        self.s: E = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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