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

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

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

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

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

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

g = A("g")
b = B("b")
l = C("l")
k = D("k")
e = E("e")
f = F("f")
a = D("a")
n = E("n")
h = E("h")
i = A("i")

g.x = e
g.w = l
g.u = n
b.v = k
b.x = n
b.u = a
b.r = a
l.s = g
l.r = b
k.q = l
k.p = f
k.r = e
k.x = e
k.y = b
k.o = n
e.s = b
f.s = k
a.q = l
a.p = f
a.r = e
a.o = e
a.y = b
a.x = h
n.s = b
h.s = b
i.x = e
i.u = e
i.w = l
assert i.u.s.r.q.s.w.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

g = A("g")
b = B("b")
l = C("l")
k = D("k")
e = E("e")
f = F("f")
a = D("a")
n = E("n")
h = E("h")
i = A("i")

g.x = e
g.w = l
g.u = n
b.v = k
b.x = n
b.u = a
b.r = a
l.s = g
l.r = b
k.q = l
k.p = f
k.r = e
k.x = e
k.y = b
k.o = n
e.s = b
f.s = k
a.q = l
a.p = f
a.r = e
a.o = e
a.y = b
a.x = h
n.s = b
h.s = b
i.x = e
i.u = e
i.w = l
assert i.u.s.r.q.s.w.r.u.txt == "a"