class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: F = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.w: I = None
        self.v: I = None
        self.t: B = None
        self.y: H = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.o: E = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.w: I = None
        self.v: I = None
        self.t: B = None
        self.y: H = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.o: E = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

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