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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.w: B = None
        self.z: D = None
        self.y: H = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

g = A("g")
l = B("l")
n = C("n")
f = D("f")
h = E("h")
c = F("c")
d = G("d")
b = H("b")
j = G("j")

g.p = l
g.u = c
g.r = c
g.y = b
g.o = n
g.q = h
l.o = g
l.w = b
l.v = j
n.o = g
n.p = c
f.r = g
f.q = d
f.y = n
f.x = l
h.w = n
c.y = n
c.x = n
c.u = b
c.w = h
d.q = c
d.u = f
d.z = f
d.w = l
d.r = l
d.y = b
d.x = g
b.o = h
j.q = c
j.u = f
j.z = f
j.w = l
j.r = l
j.y = b
j.x = g
assert b.o.w.o.r.w.w.o.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.y: H = None
        self.o: C = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.w: B = None
        self.z: D = None
        self.y: H = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

g = A("g")
l = B("l")
n = C("n")
f = D("f")
h = E("h")
c = F("c")
d = G("d")
b = H("b")
j = G("j")

g.p = l
g.u = c
g.r = c
g.y = b
g.o = n
g.q = h
l.o = g
l.w = b
l.v = j
n.o = g
n.p = c
f.r = g
f.q = d
f.y = n
f.x = l
h.w = n
c.y = n
c.x = n
c.u = b
c.w = h
d.q = c
d.u = f
d.z = f
d.w = l
d.r = l
d.y = b
d.x = g
b.o = h
j.q = c
j.u = f
j.z = f
j.w = l
j.r = l
j.y = b
j.x = g
assert b.o.w.o.r.w.w.o.p.v.txt == "j"