class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: E = None
        self.y: D = None
        self.v: C = None
        self.p: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.p: F = None
        self.o: F = None
        self.w: H = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.s: C = None
        self.v: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.p: F = None
        self.o: F = None
        self.w: H = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.s: C = None
        self.v: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

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