class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.z: F = None
        self.o: F = None
        self.w: B = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

j.r = g
j.z = g
j.o = g
j.x = g
j.v = f
j.w = l
l.r = n
n.x = h
b.z = j
b.u = h
b.s = h
b.v = l
h.w = g
h.y = j
g.q = j
c.o = n
c.s = g
c.t = g
c.r = b
c.q = b
c.w = l
c.u = l
f.o = n
f.s = g
f.t = g
f.r = b
f.q = b
f.w = l
f.u = l
m.r = g
m.z = g
m.o = g
m.x = g
m.v = c
m.w = l
assert l.r.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.z: F = None
        self.o: F = None
        self.w: B = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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