class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: I = None
        self.y: H = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.u: J = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: I = None
        self.x: E = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: J = None
        self.u: B = None
        self.w: B = None
        self.y: G = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.t: I = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.u: J = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: I = None
        self.x: E = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: J = None
        self.u: B = None
        self.w: B = None
        self.y: G = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.t: I = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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