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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: E = None
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

e.y = c
n.t = d
n.v = d
n.p = l
n.s = c
f.o = c
c.y = d
l.v = h
l.q = f
l.o = e
h.s = e
h.x = c
b.r = d
b.z = d
b.p = d
b.q = d
b.w = h
b.v = l
b.u = e
b.y = e
d.u = b
assert n.p.o.y.y.u.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: E = None
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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