class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.o: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.o: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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