class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

k = A("k")
f = B("f")
c = C("c")
g = D("g")
j = E("j")
e = F("e")
l = G("l")
m = F("m")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

k = A("k")
f = B("f")
c = C("c")
g = D("g")
j = E("j")
e = F("e")
l = G("l")
m = F("m")

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