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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.o: F = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: D = None
        self.v: F = None
        self.u: B = None
        self.s: G = None
        self.txt = txt

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

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

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

b = A("b")
d = B("d")
k = C("k")
f = D("f")
e = E("e")
a = F("a")
i = G("i")
m = H("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.o: F = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: D = None
        self.v: F = None
        self.u: B = None
        self.s: G = None
        self.txt = txt

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

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

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

b = A("b")
d = B("d")
k = C("k")
f = D("f")
e = E("e")
a = F("a")
i = G("i")
m = H("m")

b.x = i
d.s = k
k.x = b
f.y = i
f.r = e
f.o = a
f.t = b
f.u = m
e.x = i
e.s = i
e.r = f
e.v = a
e.u = d
a.t = i
a.z = f
a.s = d
a.r = k
a.o = b
i.r = d
i.x = b
m.s = b
m.y = i
m.z = k
m.p = f
m.q = a
m.t = a
m.w = d
m.v = d
assert e.v.s.s.x.x.r.s.x.txt == "b"