class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: I = None
        self.x: H = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: I = None
        self.u: D = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: I = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: I = None
        self.u: D = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

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

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

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