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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.w: D = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
i = C("i")
e = D("e")
g = E("g")
f = F("f")
j = G("j")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.w: D = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
i = C("i")
e = D("e")
g = E("g")
f = F("f")
j = G("j")
d = H("d")

l.o = j
l.u = j
l.y = g
l.s = m
l.x = e
m.u = e
m.s = j
m.t = j
i.t = f
i.w = f
i.o = e
e.t = f
e.w = g
e.q = m
e.r = l
e.z = l
e.x = j
g.u = d
g.y = f
g.v = f
g.t = f
g.w = f
g.r = l
f.r = m
f.v = m
f.x = e
f.w = e
f.u = e
j.r = m
d.r = e
assert j.r.u.t.v.u.r.y.u.txt == "d"