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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.w: F = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.w: F = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

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

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