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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: A = None
        self.v: C = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: A = None
        self.v: C = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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