class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: I = None
        self.t: F = None
        self.r: A = None
        self.p: D = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: H = None
        self.x: C = None
        self.w: G = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.t: H = None
        self.q: C = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: I = None
        self.t: F = None
        self.r: A = None
        self.p: D = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: H = None
        self.x: C = None
        self.w: G = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: H = None
        self.t: H = None
        self.q: C = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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