class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.o: D = None
        self.y: H = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.x: G = None
        self.u: I = None
        self.v: I = None
        self.q: G = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

n = A("n")
j = B("j")
i = C("i")
f = D("f")
c = E("c")
a = F("a")
b = G("b")
e = H("e")
k = I("k")
d = J("d")

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.o: D = None
        self.y: H = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.x: G = None
        self.u: I = None
        self.v: I = None
        self.q: G = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

n = A("n")
j = B("j")
i = C("i")
f = D("f")
c = E("c")
a = F("a")
b = G("b")
e = H("e")
k = I("k")
d = J("d")

n.u = k
n.t = b
j.w = d
i.o = c
i.s = b
i.y = n
f.y = c
c.q = b
a.v = n
a.p = j
b.p = n
e.w = n
e.s = i
e.o = a
k.x = f
k.o = f
k.t = i
k.y = e
k.w = e
d.w = c
d.p = n
d.r = n
d.x = b
d.q = b
d.u = k
d.v = k
d.o = e
assert b.p.u.t.y.u.w.w.txt == "n"