class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: C = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: A = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.s: B = None
        self.u: E = None
        self.q: E = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.x: E = None
        self.t: E = None
        self.z: E = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: A = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.s: B = None
        self.u: E = None
        self.q: E = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.x: E = None
        self.t: E = None
        self.z: E = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

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

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