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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.q: C = None
        self.u: I = None
        self.w: C = None
        self.z: A = None
        self.r: G = None
        self.y: A = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.s: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.t: D = None
        self.x: C = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.q: C = None
        self.u: I = None
        self.w: C = None
        self.z: A = None
        self.r: G = None
        self.y: A = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.s: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.z: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.t: D = None
        self.x: C = None
        self.s: A = None
        self.txt = txt

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

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