class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.p: F = None
        self.s: B = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.u: E = None
        self.p: B = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

d = A("d")
f = B("f")
j = C("j")
n = D("n")
i = E("i")
a = F("a")
c = B("c")
g = E("g")
k = C("k")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.p: F = None
        self.s: B = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.u: E = None
        self.p: B = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

d = A("d")
f = B("f")
j = C("j")
n = D("n")
i = E("i")
a = F("a")
c = B("c")
g = E("g")
k = C("k")

d.t = k
d.v = g
d.q = n
f.t = j
f.r = j
f.o = n
j.x = k
j.t = k
j.s = n
j.r = d
j.u = d
n.r = c
n.x = k
n.s = g
i.w = c
i.t = g
i.r = g
i.p = a
i.s = f
i.z = n
a.v = d
a.q = k
a.o = k
a.u = i
a.p = c
a.z = j
c.t = j
c.o = n
c.r = k
g.w = f
g.s = f
g.t = i
g.r = i
g.p = a
g.z = n
k.x = j
k.t = j
k.s = n
k.r = d
k.u = d
assert d.q.r.t.s.s.p.o.s.s.txt == "g"