class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.p: J = None
        self.x: F = None
        self.w: D = None
        self.y: E = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.p: B = None
        self.q: H = None
        self.y: I = None
        self.o: F = None
        self.r: A = None
        self.u: F = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: G = None
        self.x: E = None
        self.y: E = None
        self.u: E = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.p: B = None
        self.q: H = None
        self.y: I = None
        self.o: F = None
        self.r: A = None
        self.u: F = None
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: G = None
        self.x: E = None
        self.y: E = None
        self.u: E = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.r: E = None
        self.txt = txt

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

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