class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.x: C = None
        self.q: H = None
        self.w: D = None
        self.u: F = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

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

c.s = n
c.u = n
c.y = l
c.x = l
c.q = h
c.w = m
c.o = m
k.p = g
l.u = c
l.p = c
l.v = n
m.v = g
a.x = l
n.t = g
g.s = n
h.o = c
h.p = c
h.x = n
assert a.x.v.t.s.t.s.t.txt == "g"