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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.v: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: H = None
        self.y: E = None
        self.x: H = None
        self.z: E = None
        self.v: H = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

f = A("f")
c = B("c")
k = C("k")
h = D("h")
b = E("b")
l = F("l")
m = G("m")
i = H("i")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.v: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: H = None
        self.y: E = None
        self.x: H = None
        self.z: E = None
        self.v: H = None
        self.s: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

f = A("f")
c = B("c")
k = C("k")
h = D("h")
b = E("b")
l = F("l")
m = G("m")
i = H("i")
a = D("a")

f.y = k
f.v = k
f.s = m
f.r = b
c.u = f
c.o = m
c.z = m
c.v = b
k.w = l
h.r = f
h.t = i
h.x = i
h.v = i
h.y = b
h.z = b
h.s = c
h.o = k
b.x = i
b.p = f
l.x = k
m.u = l
m.p = i
m.t = i
m.w = b
m.o = h
i.t = c
i.s = l
a.r = f
a.t = i
a.x = i
a.v = i
a.y = b
a.z = b
a.s = c
a.o = k
assert c.v.x.t.o.u.x.txt == "k"