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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.v: F = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.v: F = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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