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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.y: F = None
        self.z: A = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: A = None
        self.w: A = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

g = A("g")
h = B("h")
e = C("e")
i = D("i")
a = E("a")
c = F("c")
f = C("f")

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.y: F = None
        self.z: A = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: A = None
        self.w: A = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

g = A("g")
h = B("h")
e = C("e")
i = D("i")
a = E("a")
c = F("c")
f = C("f")

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