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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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