class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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