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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.q: G = None
        self.v: E = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: E = None
        self.o: I = None
        self.s: F = None
        self.p: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.q: G = None
        self.v: E = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: E = None
        self.o: I = None
        self.s: F = None
        self.p: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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