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

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

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

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

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

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

d = A("d")
n = B("n")
l = C("l")
a = D("a")
g = E("g")
j = F("j")
b = B("b")
h = A("h")
i = B("i")
f = C("f")

d.r = j
d.s = f
d.t = l
d.y = g
n.w = a
n.v = f
n.q = g
n.y = h
n.t = i
l.v = f
l.z = g
a.z = j
g.t = a
g.w = a
g.r = f
j.s = g
j.p = h
b.w = a
b.v = l
b.q = g
b.y = h
b.t = i
h.r = j
h.s = f
h.t = l
h.y = g
i.w = a
i.v = l
i.q = g
i.y = h
i.t = b
f.v = l
f.z = g
assert h.t.z.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

d = A("d")
n = B("n")
l = C("l")
a = D("a")
g = E("g")
j = F("j")
b = B("b")
h = A("h")
i = B("i")
f = C("f")

d.r = j
d.s = f
d.t = l
d.y = g
n.w = a
n.v = f
n.q = g
n.y = h
n.t = i
l.v = f
l.z = g
a.z = j
g.t = a
g.w = a
g.r = f
j.s = g
j.p = h
b.w = a
b.v = l
b.q = g
b.y = h
b.t = i
h.r = j
h.s = f
h.t = l
h.y = g
i.w = a
i.v = l
i.q = g
i.y = h
i.t = b
f.v = l
f.z = g
assert h.t.z.w.z.txt == "j"