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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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