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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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