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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.u: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

e = A("e")
d = B("d")
j = C("j")
a = D("a")
b = E("b")
k = F("k")
i = G("i")
h = C("h")

e.o = h
e.t = k
d.y = k
d.p = k
j.u = d
j.y = e
j.q = e
a.s = b
a.o = b
b.p = i
b.o = i
b.u = k
b.s = k
b.t = a
k.p = h
k.y = b
k.s = b
k.r = d
k.u = j
i.q = h
h.u = d
h.y = e
h.q = e
assert i.q.y.t.r.y.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.u: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

e = A("e")
d = B("d")
j = C("j")
a = D("a")
b = E("b")
k = F("k")
i = G("i")
h = C("h")

e.o = h
e.t = k
d.y = k
d.p = k
j.u = d
j.y = e
j.q = e
a.s = b
a.o = b
b.p = i
b.o = i
b.u = k
b.s = k
b.t = a
k.p = h
k.y = b
k.s = b
k.r = d
k.u = j
i.q = h
h.u = d
h.y = e
h.q = e
assert i.q.y.t.r.y.y.t.txt == "a"