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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.x: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.x: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

l.x = i
a.x = l
a.s = g
k.r = h
k.v = f
g.w = k
g.p = h
g.x = f
g.q = i
f.y = k
h.q = a
h.v = a
h.u = a
h.t = g
h.s = g
h.y = l
h.r = f
h.p = i
i.x = f
i.o = h
i.s = h
i.u = h
i.v = k
i.r = g
j.t = k
j.o = f
d.x = i
assert h.q.s.w.r.y.x.u.txt == "h"