class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: G = None
        self.r: G = None
        self.o: E = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.s: C = None
        self.y: D = None
        self.txt = txt

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

l = A("l")
a = B("a")
e = C("e")
j = D("j")
d = E("d")
c = F("c")
f = G("f")
g = B("g")
h = E("h")
b = E("b")

l.r = c
l.z = e
l.y = h
a.v = e
a.s = c
e.w = l
e.p = f
e.r = f
e.o = d
e.t = a
j.o = g
d.u = f
d.o = f
d.t = e
c.p = h
c.r = j
c.y = j
c.s = e
f.o = j
f.r = j
f.u = g
g.v = e
g.s = c
h.u = f
h.o = f
h.t = e
b.u = f
b.o = f
b.t = e
assert a.s.r.o.v.o.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: G = None
        self.r: G = None
        self.o: E = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.s: C = None
        self.y: D = None
        self.txt = txt

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

l = A("l")
a = B("a")
e = C("e")
j = D("j")
d = E("d")
c = F("c")
f = G("f")
g = B("g")
h = E("h")
b = E("b")

l.r = c
l.z = e
l.y = h
a.v = e
a.s = c
e.w = l
e.p = f
e.r = f
e.o = d
e.t = a
j.o = g
d.u = f
d.o = f
d.t = e
c.p = h
c.r = j
c.y = j
c.s = e
f.o = j
f.r = j
f.u = g
g.v = e
g.s = c
h.u = f
h.o = f
h.t = e
b.u = f
b.o = f
b.t = e
assert a.s.r.o.v.o.u.o.txt == "j"