class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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

c = A("c")
a = B("a")
d = C("d")
h = D("h")
g = E("g")
l = F("l")
i = G("i")
e = H("e")

c.s = g
a.t = h
a.x = h
a.w = l
d.y = c
h.p = g
h.x = a
g.p = h
g.v = l
g.r = a
l.s = g
l.q = g
l.r = i
l.y = a
i.w = l
i.o = c
i.y = h
e.p = a
e.u = l
e.o = i
assert i.o.s.v.r.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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

c = A("c")
a = B("a")
d = C("d")
h = D("h")
g = E("g")
l = F("l")
i = G("i")
e = H("e")

c.s = g
a.t = h
a.x = h
a.w = l
d.y = c
h.p = g
h.x = a
g.p = h
g.v = l
g.r = a
l.s = g
l.q = g
l.r = i
l.y = a
i.w = l
i.o = c
i.y = h
e.p = a
e.u = l
e.o = i
assert i.o.s.v.r.y.x.txt == "a"