class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.r: E = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.p: B = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: F = None
        self.r: E = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

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