class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: A = None
        self.u: J = None
        self.t: H = None
        self.z: F = None
        self.s: B = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: A = None
        self.u: J = None
        self.t: H = None
        self.z: F = None
        self.s: B = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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