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

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

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

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

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

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

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

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

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

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

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

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

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

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

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