class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: B = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.z: E = None
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.z: E = None
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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