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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.z: E = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.z: E = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

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