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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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