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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.r: D = None
        self.q: B = None
        self.v: B = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: B = 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.o: F = None
        self.u: E = None
        self.y: A = None
        self.z: E = None
        self.v: B = None
        self.x: C = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.r: D = None
        self.q: B = None
        self.v: B = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: B = 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.o: F = None
        self.u: E = None
        self.y: A = None
        self.z: E = None
        self.v: B = None
        self.x: C = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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