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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.t: A = None
        self.p: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: F = None
        self.t: A = None
        self.p: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

j.v = b
j.y = h
i.u = b
i.t = g
i.r = a
k.x = e
k.y = e
k.s = g
k.t = b
k.p = b
k.u = j
a.s = h
a.o = m
a.p = g
a.w = g
m.x = b
m.t = h
m.w = j
g.u = a
b.v = j
b.y = h
h.u = j
h.t = g
h.r = a
e.x = k
e.y = k
e.s = g
e.t = b
e.p = j
e.u = j
assert e.x.s.u.s.r.o.w.v.v.txt == "j"