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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.r: E = None
        self.s: E = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.q: E = None
        self.x: B = None
        self.o: A = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.r: E = None
        self.s: E = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.q: E = None
        self.x: B = None
        self.o: A = None
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

a.o = d
a.w = g
j.t = l
j.o = c
l.t = k
l.v = k
l.r = g
l.s = g
l.w = c
l.p = j
f.w = c
g.r = c
g.o = c
g.u = j
g.q = d
d.q = g
c.x = j
c.t = f
k.v = g
k.q = g
k.r = l
k.x = j
k.o = a
k.p = a
k.w = a
assert f.w.t.w.x.t.w.txt == "c"