class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.u: F = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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