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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: H = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.w: C = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.r: G = None
        self.w: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: H = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.w: C = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.r: G = None
        self.w: I = None
        self.txt = txt

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

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

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