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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.w: A = None
        self.p: D = None
        self.txt = txt

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

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

h.r = e
h.w = g
h.x = l
h.t = l
h.u = l
j.s = h
k.u = d
d.x = g
l.x = h
l.w = h
l.r = e
l.p = d
e.x = h
e.v = k
e.s = j
e.w = j
e.u = d
e.t = d
b.s = h
g.x = h
g.v = k
g.s = b
g.u = d
g.t = d
g.w = j
assert e.v.u.x.s.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.x: E = None
        self.t: E = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.w: A = None
        self.p: D = None
        self.txt = txt

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

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

h.r = e
h.w = g
h.x = l
h.t = l
h.u = l
j.s = h
k.u = d
d.x = g
l.x = h
l.w = h
l.r = e
l.p = d
e.x = h
e.v = k
e.s = j
e.w = j
e.u = d
e.t = d
b.s = h
g.x = h
g.v = k
g.s = b
g.u = d
g.t = d
g.w = j
assert e.v.u.x.s.s.w.txt == "g"