class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.v: B = None
        self.s: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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