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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: H = None
        self.x: F = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: C = None
        self.p: I = None
        self.r: C = None
        self.o: E = None
        self.w: G = None
        self.t: G = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.v: C = None
        self.r: H = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.x: H = None
        self.z: B = None
        self.u: D = None
        self.q: E = None
        self.y: D = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

l.s = e
l.v = e
l.y = a
l.x = d
l.r = j
l.t = g
j.t = d
j.o = e
j.x = b
j.v = m
j.y = m
a.u = g
a.q = m
a.x = d
d.q = m
d.w = m
d.t = m
d.s = a
d.r = a
d.y = a
d.p = g
d.o = f
d.v = b
f.y = e
f.w = g
b.y = f
b.r = m
m.o = a
m.v = a
m.s = a
m.w = l
m.r = e
m.t = d
e.t = a
g.o = d
g.u = d
g.y = d
g.p = b
g.s = b
g.x = e
g.z = j
g.q = f
g.t = l
assert m.r.t.u.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: C = None
        self.x: D = None
        self.v: H = None
        self.r: B = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: H = None
        self.x: F = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: C = None
        self.p: I = None
        self.r: C = None
        self.o: E = None
        self.w: G = None
        self.t: G = None
        self.y: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.v: C = None
        self.r: H = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.x: H = None
        self.z: B = None
        self.u: D = None
        self.q: E = None
        self.y: D = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

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