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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.v: D = None
        self.q: H = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: I = None
        self.v: D = None
        self.q: H = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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