class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.t: B = None
        self.u: E = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.s: A = None
        self.x: F = None
        self.txt = txt

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

c = A("c")
f = B("f")
m = C("m")
g = D("g")
k = E("k")
h = F("h")
j = E("j")
a = F("a")

c.v = f
c.t = f
c.x = j
c.u = k
c.w = m
f.y = a
m.o = k
m.t = k
m.u = g
m.w = f
m.r = h
g.o = f
g.v = h
g.q = h
k.z = g
k.u = c
k.s = c
k.x = a
h.t = g
h.z = f
h.s = f
h.x = j
h.u = a
h.o = a
j.z = g
j.u = c
j.s = c
j.x = h
a.t = g
a.z = f
a.s = f
a.x = k
a.u = h
a.o = h
assert f.y.t.o.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.t: B = None
        self.u: E = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: A = None
        self.s: A = None
        self.x: F = None
        self.txt = txt

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

c = A("c")
f = B("f")
m = C("m")
g = D("g")
k = E("k")
h = F("h")
j = E("j")
a = F("a")

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