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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.v: F = None
        self.p: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.q: D = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.o: H = None
        self.x: E = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.v: F = None
        self.p: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: B = None
        self.q: D = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.o: H = None
        self.x: E = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

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

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