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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: A = None
        self.q: F = None
        self.x: G = None
        self.s: F = None
        self.u: F = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.y: C = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.p: E = None
        self.t: F = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: A = None
        self.q: F = None
        self.x: G = None
        self.s: F = None
        self.u: F = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.y: C = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.p: E = None
        self.t: F = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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