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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.u: H = None
        self.w: B = None
        self.r: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: C = None
        self.z: G = None
        self.v: B = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.u: H = None
        self.w: B = None
        self.r: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: C = None
        self.z: G = None
        self.v: B = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

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