class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

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

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

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

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