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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.y: H = None
        self.x: A = None
        self.r: B = None
        self.w: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: H = None
        self.y: H = None
        self.x: A = None
        self.r: B = None
        self.w: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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