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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.t: B = None
        self.q: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.p: A = None
        self.o: E = None
        self.y: G = None
        self.t: B = None
        self.q: C = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

g = A("g")
m = B("m")
b = C("b")
k = D("k")
l = E("l")
d = F("d")
n = G("n")
c = H("c")
f = A("f")
i = F("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.t: B = None
        self.q: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.p: A = None
        self.o: E = None
        self.y: G = None
        self.t: B = None
        self.q: C = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

g = A("g")
m = B("m")
b = C("b")
k = D("k")
l = E("l")
d = F("d")
n = G("n")
c = H("c")
f = A("f")
i = F("i")

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