class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: I = None
        self.x: C = None
        self.t: F = None
        self.r: C = None
        self.q: D = None
        self.u: I = None
        self.z: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: I = None
        self.x: C = None
        self.t: F = None
        self.r: C = None
        self.q: D = None
        self.u: I = None
        self.z: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.txt = txt

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

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