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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
b = C("b")
h = D("h")
a = E("a")
k = F("k")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.txt = txt

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

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

d = A("d")
g = B("g")
b = C("b")
h = D("h")
a = E("a")
k = F("k")
j = E("j")

d.v = k
d.o = b
d.r = b
d.w = h
g.w = b
g.u = b
g.p = k
g.s = d
b.o = h
b.y = h
b.t = k
b.q = g
h.x = j
h.y = k
a.q = j
a.z = j
a.o = d
a.u = d
a.r = k
a.w = b
k.y = g
k.w = b
j.q = a
j.z = a
j.o = d
j.u = d
j.r = k
j.w = b
assert g.s.v.y.s.txt == "d"