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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.x: G = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.r: E = None
        self.t: F = None
        self.u: E = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.s: H = None
        self.p: G = None
        self.z: F = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: A = None
        self.x: G = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.r: E = None
        self.t: F = None
        self.u: E = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: A = None
        self.s: H = None
        self.p: G = None
        self.z: F = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

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

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