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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.x: A = None
        self.s: D = None
        self.q: G = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.t: G = None
        self.v: F = None
        self.z: G = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.x: A = None
        self.s: D = None
        self.q: G = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.t: G = None
        self.v: F = None
        self.z: G = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

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

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