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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.q: B = None
        self.p: D = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.w: E = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.q: B = None
        self.p: D = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.w: E = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

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

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