class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.r: G = None
        self.v: C = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: D = None
        self.w: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: D = None
        self.w: B = None
        self.x: E = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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