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

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

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

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

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

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

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

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

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

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

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

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

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

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

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