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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

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

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

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