class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.w: H = None
        self.q: H = None
        self.s: D = None
        self.p: E = None
        self.y: E = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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