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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.p: E = None
        self.v: D = None
        self.t: C = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: D = None
        self.p: E = None
        self.v: D = None
        self.t: C = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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