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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: C = None
        self.o: F = None
        self.w: F = None
        self.u: H = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: C = None
        self.o: F = None
        self.w: F = None
        self.u: H = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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