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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.x: C = None
        self.s: C = None
        self.r: E = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
h = C("h")
j = D("j")
c = E("c")
g = F("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.x: C = None
        self.s: C = None
        self.r: E = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
h = C("h")
j = D("j")
c = E("c")
g = F("g")

f.u = h
f.o = h
f.z = g
f.p = c
f.r = m
m.v = c
m.y = h
m.t = g
m.r = j
m.u = f
h.w = c
h.u = f
h.r = f
h.o = g
h.v = g
j.v = h
j.p = h
j.x = h
j.s = h
j.r = c
c.p = m
c.v = f
g.y = h
g.v = m
assert g.y.u.z.txt == "g"