class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: B = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: F = None
        self.t: B = None
        self.z: B = None
        self.u: D = None
        self.q: G = None
        self.s: I = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: B = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: F = None
        self.t: B = None
        self.z: B = None
        self.u: D = None
        self.q: G = None
        self.s: I = None
        self.p: D = None
        self.txt = txt

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

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

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