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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.v: C = None
        self.r: C = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.p: F = None
        self.o: B = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

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

h.r = m
h.u = a
h.t = j
h.w = g
h.v = g
c.o = h
c.s = n
j.r = m
j.p = a
j.y = n
g.x = n
g.w = a
g.y = a
g.v = j
g.r = j
g.s = c
n.s = c
n.w = c
n.v = j
n.t = h
n.x = h
m.t = c
m.x = c
m.o = c
m.v = c
m.p = l
m.y = j
l.t = c
l.x = c
l.o = c
l.v = c
l.p = m
l.y = j
a.x = n
a.w = g
a.y = g
a.v = j
a.r = j
a.s = c
assert n.s.o.u.y.v.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.t: C = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.v: C = None
        self.r: C = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.p: F = None
        self.o: B = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

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

h.r = m
h.u = a
h.t = j
h.w = g
h.v = g
c.o = h
c.s = n
j.r = m
j.p = a
j.y = n
g.x = n
g.w = a
g.y = a
g.v = j
g.r = j
g.s = c
n.s = c
n.w = c
n.v = j
n.t = h
n.x = h
m.t = c
m.x = c
m.o = c
m.v = c
m.p = l
m.y = j
l.t = c
l.x = c
l.o = c
l.v = c
l.p = m
l.y = j
a.x = n
a.w = g
a.y = g
a.v = j
a.r = j
a.s = c
assert n.s.o.u.y.v.r.p.txt == "l"