class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.y: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.r: B = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.r: B = None
        self.y: A = None
        self.q: D = None
        self.txt = txt

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

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

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

e.t = f
e.q = m
e.y = g
e.p = g
a.p = c
a.u = e
a.y = f
a.s = l
g.s = c
g.p = c
g.y = d
g.v = e
k.o = e
k.v = m
k.r = a
k.t = c
k.p = l
m.q = a
m.y = d
c.q = f
c.u = e
f.z = a
f.r = a
f.t = c
f.y = e
f.q = k
l.s = d
l.u = k
l.t = f
l.v = e
l.r = e
d.r = e
d.u = f
assert f.y.t.r.p.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.y: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: F = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.r: B = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.r: B = None
        self.y: A = None
        self.q: D = None
        self.txt = txt

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

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

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

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