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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: D = None
        self.s: A = None
        self.u: H = None
        self.t: G = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
l = D("l")
c = E("c")
f = F("f")
i = G("i")
n = H("n")
e = I("e")
m = J("m")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: D = None
        self.s: A = None
        self.u: H = None
        self.t: G = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

g = A("g")
b = B("b")
j = C("j")
l = D("l")
c = E("c")
f = F("f")
i = G("i")
n = H("n")
e = I("e")
m = J("m")

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