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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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