class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: E = None
        self.v: D = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.q: G = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.q: G = None
        self.x: D = None
        self.txt = txt

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

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

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

l.y = m
l.o = c
l.v = j
l.s = k
l.t = e
k.s = b
k.r = b
k.o = n
k.q = j
b.v = c
j.v = c
c.y = b
c.w = b
c.o = b
n.o = e
n.q = e
n.z = b
n.x = j
m.y = c
d.t = e
d.w = c
d.v = c
e.y = c
assert k.o.x.v.y.v.o.txt == "b"