class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: I = None
        self.r: I = None
        self.s: D = None
        self.t: G = None
        self.x: I = None
        self.p: G = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: H = None
        self.x: C = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.v: B = None
        self.t: C = None
        self.w: F = None
        self.y: J = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: H = None
        self.o: J = None
        self.y: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: H = None
        self.x: C = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: E = None
        self.v: B = None
        self.t: C = None
        self.w: F = None
        self.y: J = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: H = None
        self.o: J = None
        self.y: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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