class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: D = None
        self.x: B = None
        self.v: D = None
        self.y: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.o: F = None
        self.w: C = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
m = D("m")
g = E("g")
n = F("n")
i = D("i")
e = B("e")
j = F("j")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.o: F = None
        self.w: C = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
m = D("m")
g = E("g")
n = F("n")
i = D("i")
e = B("e")
j = F("j")
d = C("d")

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