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

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

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

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

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

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

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

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

b = A("b")
n = B("n")
m = C("m")
a = D("a")
h = E("h")
d = F("d")
c = G("c")
l = H("l")
e = D("e")
k = F("k")

b.p = d
b.q = n
b.y = n
b.r = n
b.u = l
b.w = a
b.v = h
n.r = h
m.s = d
m.w = l
m.v = l
m.x = c
m.t = c
m.q = c
m.u = k
m.r = h
a.x = b
a.o = e
h.w = l
d.u = a
d.w = k
d.p = m
c.s = b
c.o = n
c.v = l
c.u = l
c.t = k
c.r = e
l.x = m
l.u = a
l.v = h
l.s = h
l.y = b
l.o = b
e.x = b
e.o = a
k.u = a
k.w = d
k.p = m
assert e.o.x.v.w.u.x.u.u.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: B = None
        self.u: H = None
        self.w: D = None
        self.y: B = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

b = A("b")
n = B("n")
m = C("m")
a = D("a")
h = E("h")
d = F("d")
c = G("c")
l = H("l")
e = D("e")
k = F("k")

b.p = d
b.q = n
b.y = n
b.r = n
b.u = l
b.w = a
b.v = h
n.r = h
m.s = d
m.w = l
m.v = l
m.x = c
m.t = c
m.q = c
m.u = k
m.r = h
a.x = b
a.o = e
h.w = l
d.u = a
d.w = k
d.p = m
c.s = b
c.o = n
c.v = l
c.u = l
c.t = k
c.r = e
l.x = m
l.u = a
l.v = h
l.s = h
l.y = b
l.o = b
e.x = b
e.o = a
k.u = a
k.w = d
k.p = m
assert e.o.x.v.w.u.x.u.u.o.x.txt == "b"