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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.v: D = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: A = None
        self.v: D = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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